//
//  TTScreenItemModel.m
//  TaoTuo
//
//  Created by LG on 2020/11/17.
//  Copyright © 2020 刘广. All rights reserved.
//

#import "LLScreenItemModel.h"

@implementation LLScreenItemModel

+ (instancetype)setModelWithTitle:(NSString *)title value:(NSString *)value isEnable:(BOOL)isEnable
{
    LLScreenItemModel *model = [[self alloc] init];
    model.title = title;
    model.value = value;
    model.isEnable = isEnable;
    return model;
}

+ (instancetype)setModelWithValue:(NSString *)value unitString:(NSString *)unitString
{
    return [self setModelWithValue:value unitString:unitString imageName:nil];
}

+ (instancetype)setModelWithValue:(NSString *)value unitString:(NSString *)unitString btnImageName:(NSString *)btnImageName
{
    LLScreenItemModel *model = [[self alloc] init];
    model.value = value;
    model.unitString = unitString;
    
    if (unitString.length > 0) {
        model.title = [NSString stringWithFormat:@"%@%@", value, unitString];
    } else {
        model.title = value;
    }
    
    model.btnImageName = btnImageName;
    
    return model;
}

+ (instancetype)setModelWithValue:(NSString *)value unitString:(NSString *)unitString imageName:(NSString *)imageName
{
    LLScreenItemModel *model = [[self alloc] init];
    model.value = value;
    model.unitString = unitString;
    
    if (unitString.length > 0) {
        model.title = [NSString stringWithFormat:@"%@%@", value, unitString];
    } else {
        model.title = value;
    }
    
    model.imageName = imageName;
    
    return model;
}

@end
